package com.fy.admin.api;


import com.fy.admin.dto.EntityOrderDto;
import com.fy.admin.dto.TicketOrderDto;
import com.fy.common.api.CommonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/order")
@Api(tags = "订单管理")
@RefreshScope
public class OrderManagementController {
//    门票
    @ApiOperation("门票查询所有")
    @GetMapping(value = "/ticket/findAll/{pageSize}/{limit}")
    public CommonResult ticketFindAll(@PathVariable Integer pageSize, @PathVariable Integer limit) {
        List<TicketOrderDto> list = null;
        return CommonResult.success(list);
    }

    @ApiOperation("根据门票ID查询")
    @GetMapping(value = "/ticket/findById/{id}")
    public CommonResult ticketFindById(@PathVariable Integer id) {
        return CommonResult.success(new TicketOrderDto());
    }

    @ApiOperation("锁定门票订单")
    @PostMapping(value = "/ticket/isLocking/{id}")
    public CommonResult ticketIsLocking(@PathVariable Integer id) {
        return CommonResult.success();
    }

    @ApiOperation("更新门票状态")
    @PostMapping(value = "/ticket/updateState/{id}")
    public CommonResult ticketUpdateState(@PathVariable Integer id) {
        return CommonResult.success();
    }

//实物
    @ApiOperation("实物订单查询所有")
    @GetMapping(value = "/entity/findAll/{pageSize}/{limit}")
    public CommonResult entityFindAll(@PathVariable Integer pageSize, @PathVariable Integer limit) {
        List<EntityOrderDto> list = null;
        return CommonResult.success(list);
    }

    @ApiOperation("实物订单根据ID查询")
    @GetMapping(value = "/entity/findById/{id}")
    public CommonResult findById(@PathVariable Integer id) {
        List<EntityOrderDto> list = null;
        return CommonResult.success(new EntityOrderDto());
    }
    @ApiOperation("锁定门票订单")
    @PostMapping(value = "/entity/isLocking/{id}")
    public CommonResult entityIsLocking(@PathVariable Integer id) {
        return CommonResult.success();
    }

    @ApiOperation("更新门票状态")
    @PostMapping(value = "/entity/updateState/{id}")
    public CommonResult entityUpdateState(@PathVariable Integer id) {
        return CommonResult.success();
    }
}
